Counting Base b Digits

Theorem

Let nZ+. The base b expansion of n has exactly logb(n)+1 digits.

Proof

If n has d digits in base b, then it satisfies

bd1n<bd

because it has a unique base b expansion as

n=a0+a1b+ad1bd1

where 0ai<b and ad10. That is, it is at least the smallest d digit number and less than the smallest d+1 digit number.

Since logb is a strictly increasing function, we have

d1=logb(bd1)logb(n)<logb(bd)=d.

Being squeezed between consecutive integers, we conclude that d1=logb(n) and thus d=logb(n)+1.